# -*- coding: utf-8 -*-
'''
@文件    :auth.py
@说明    :
@时间    :2025/08/28 15:30:00
@作者    :浪晋
@版本    :1.0
'''

from pydantic import Field, BaseModel
from typing import Optional, Union, Any, List, Dict
from decimal import Decimal
from datetime import date, datetime
from app.schemas.base import BaseQuerySchema


class BaseSchema(BaseModel):
    realName: Union[str, None] = Field(..., description="真实姓名")
    idCardNum: Union[str, None] = Field(..., description="身份证号")
    sex: str = Field(None, description="性别")
    nation: str = Field(None, description="民族")
    birthday: str = Field(None, description="生日")
    address: str = Field(None, description="住址")
    idCardUpPic: Union[str, None] = Field(..., description="身份证正面")
    idCardDownPic: Union[str, None] = Field(..., description="身份证反面")
    idCardHandPic: str = Field(None, description="手持身份证")
    user: Union[Any, None] = Field(..., description="用户")


class QuerySchema(BaseQuerySchema):
    realName: Optional[Union[str, None]] = Field(None, description="真实姓名")
    idCardNum: Optional[Union[str, None]] = Field(None, description="身份证号")
    sex: Optional[str] = Field(None, description="性别")
    nation: Optional[str] = Field(None, description="民族")
    birthday: Optional[str] = Field(None, description="生日")
    address: Optional[str] = Field(None, description="住址")
    idCardUpPic: Optional[Union[str, None]] = Field(None, description="身份证正面")
    idCardDownPic: Optional[Union[str, None]] = Field(None, description="身份证反面")
    idCardHandPic: Optional[str] = Field(None, description="手持身份证")
    user: Optional[Union[Any, None]] = Field(None, description="用户")


class CreateSchema(BaseSchema):
    ...

class UpdateSchema(BaseSchema):
    id: int = Field(..., description="主键Id", example="1")